#include<iostream>
#include<algorithm>
using namespace std;
int n, m;
int max_1[1000010];
int fun1(int n)
{
	int count = 1;
	while (n != 1) {
		if (n % 2 == 1) {
			n = 3 * n + 1;
		}
		else {
			n = n / 2;
		}
		count++;
	}
	return count;
}
void fun()
{
	max_1[1] = 1;
	for (int i = 2; i <= 1000010; i++) {
		max_1[i] = fun1(i);
	}
}
int main()
{
	fun();
	while (cin >> n >> m) {
		int max_1 = -100;
		for (int i = n; i < m + 1; i++) {
			max_1 = max(max_1, i);
		}
		cout << n << " " << m << " " << max_1 << endl;
	}
	return 0;
}